/*
  Name: DeadProxyLoginThread.h
  Copyright: 
  Author: Carl Chatfield
  Date: 09/01/08 22:57
  Description: Thread which the login server runs in
*/

#ifndef __DEADPROXYLOGINTHREAD_h__
#define __DEADPROXYLOGINTHREAD_h__

#ifdef __BORLANDC__
	#pragma hdrstop
#endif

#ifndef WX_PRECOMP
	#include <wx/wx.h>
#else
	#include <wx/wxprec.h>
#endif

//#include "DeadProxyLoginServer.h"
#include <wx/socket.h>

#include "DeadProxyPacketBuffer.h"
#include <windows.h>
#include <winsock.h>
#include <stdio.h>

class LoginThread : public wxThread
{
    private:
        SOCKET serverSock;
        SOCKET clientSock;
        char buffer[65536];
	public:
        // thread execution starts here
        virtual void *Entry();

        // called when the thread exits - whether it terminates normally or is
        // stopped with Delete() (but not when it is Kill()ed!)
        virtual void OnExit();
        LoginThread(SOCKET sSock);
};

#endif
